Skip to content

feat(plugin): auto-update marketplace clone in session-start#1107

Merged
JeremyDev87 merged 1 commit into
masterfrom
feat/auto-update-marketplace-1101
Apr 1, 2026
Merged

feat(plugin): auto-update marketplace clone in session-start#1107
JeremyDev87 merged 1 commit into
masterfrom
feat/auto-update-marketplace-1101

Conversation

@JeremyDev87

Copy link
Copy Markdown
Owner

Summary

  • Workaround for Claude Code /plugin update not pulling marketplace shallow clone (Plugin update doesn't pull marketplace repo — shallow clone stays stale anthropics/claude-code#40214)
  • session-start.py Step 0.5: auto-fetch marketplace repo and reset if newer version exists
  • New hooks/lib/updater.py module with auto_update_marketplace()
  • 24h throttle via timestamp file to minimize network overhead
  • 5s timeout on all git operations with TimeoutExpired graceful handling
  • Handle shallow clones (git fetch --unshallow before reset --hard)
  • Update notification in session greeting when new version detected

Test plan

  • test_finds_jeremydev87_marketplace — finds marketplace clone path
  • test_returns_none_when_no_marketplace — graceful when no clone
  • test_should_check_when_no_timestamp_file — first run triggers check
  • test_should_not_check_within_throttle — skips within 24h
  • test_returns_none_when_up_to_date — no update when HEAD == origin
  • test_returns_version_when_updated — returns version after reset
  • All 40 tests pass (11 updater + 29 session-start)

Closes #1101

Workaround for Claude Code /plugin update not pulling the marketplace
shallow clone (anthropics/claude-code#40214). Session-start now
auto-fetches the marketplace repo and resets if a newer version exists.

- Add hooks/lib/updater.py with auto_update_marketplace()
- 24h throttle via timestamp file to minimize network overhead
- 5s timeout on all git operations with TimeoutExpired handling
- Handle shallow clones (git fetch --unshallow before reset)
- Show update notification in session greeting when new version found
- 11 tests for updater module (find/throttle/update scenarios)

Closes #1101
@vercel

vercel Bot commented Apr 1, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
codingbuddy-landing Ready Ready Preview, Comment Apr 1, 2026 6:10am

@JeremyDev87 JeremyDev87 self-assigned this Apr 1, 2026
@JeremyDev87 JeremyDev87 merged commit e9a1928 into master Apr 1, 2026
28 checks passed
@JeremyDev87 JeremyDev87 deleted the feat/auto-update-marketplace-1101 branch April 1, 2026 06:11
@JeremyDev87 JeremyDev87 mentioned this pull request Apr 1, 2026
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(plugin): auto-update marketplace clone in session-start hook

1 participant